#version 300 es

layout(location=1)in vec4 aVerPos;
uniform vec2 flipScale;
uniform float rotationRadian;
out vec2 yuvTexPos;

void main() {
    float sinRad=sin(rotationRadian);
    float cosRad=cos(rotationRadian);
    mat4 rotMat=mat4(
    cosRad, -sinRad, 0.0, 0.0,
    sinRad, cosRad, 0.0, 0.0,
    0.0, 0.0, 1.0, 0.0,
    0.0, 0.0, 0.0, 1.0
    );
    yuvTexPos=flipScale*(aVerPos/2.0*rotMat).xy+0.5;
    gl_Position=aVerPos;
}
